fix(🔃): fix dependency cycles in header files#257
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR fixes dependency cycles in C++ header files to improve compilation and prevent circular include issues. The changes involve converting static functions to inline functions in unions header file and reordering includes to break circular dependencies.
- Convert static functions to inline functions in Unions.h to enable header-only implementation
- Reorder includes to break circular dependencies between headers
- Add forward declarations where needed to prevent circular includes
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/webgpu/cpp/rnwgpu/api/descriptors/Unions.h | Convert all static function declarations to inline to enable header-only usage |
| packages/webgpu/cpp/rnwgpu/api/GPURenderPassEncoder.cpp | Reorder includes to place Convertors.h before GPURenderPassEncoder.h |
| packages/webgpu/cpp/rnwgpu/api/GPUError.h | Reorder standard library includes alphabetically |
| packages/webgpu/cpp/rnwgpu/api/Convertors.h | Add include for Unions.h header |
| packages/webgpu/cpp/jsi/RNFJSIConverter.h | Remove circular include and add Unions.h include |
| packages/webgpu/cpp/jsi/RNFHybridObject.h | Replace direct include with forward declaration and move include after |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@copilot can you approve the PR? |
No description provided.